from public.action import *
from public.business import *
from public.testData import *
from public.tools import *

testCase = "DBshop005_订单查询"
# 打开网址并登录
firefox = openBrowser(urlAdmin)
DBshopLoginAdmin(firefox)
# 进入"销售管理"-"订单管理"
DBshopEnterMenu2(firefox, '销售管理', '订单管理')
firefox.find_element_by_name('order_sn').send_keys(1666617842950021)
firefox.find_element_by_xpath('//button[contains(.,"搜索")]').click()

# 断言
try:
    firefox.find_element_by_xpath('//tbody[1]/tr[2]/td[2]').text == 1666617842950021
    writeLog("%s 测试通过" % testCase)
except:
    writeLog("%s 测试失败" % testCase)
    getPhoto(firefox)
firefox.quit()


